Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
Django 3.1 | Admin page appearance issue

Today I have updated Django to latest version 3.1.

But for some reason when the logged in to admin page, all I cans see is a weird looking admin page.

Django Admin screenshot

admin.py

admin.py

Can someone help me what went wrong or what are things I need to modify to get back to original admin page.

Thanks in advance

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

In your projects' root urls.py file, simply add the below code to disable the new sidebar feature.

from django.contrib import admin

admin.autodiscover()
admin.site.enable_nav_sidebar = False

Reference:

  1. https://docs.djangoproject.com/en/3.1/releases/3.1/#django-contrib-admin
  2. https://docs.djangoproject.com/en/3.1/ref/contrib/admin/#django.contrib.admin.AdminSite.enable_nav_sidebar
over 4 years ago · Santiago Trujillo Relatório

0

It looks like one of two problems.

  1. Your browser is caching the CSS / JS from the old version, in which case clear your cache and reload.

  2. You didn't run ./manage.py collectstatic after updgrading.

Judging from your comment, it's probably the former.

over 4 years ago · Santiago Trujillo Relatório

0

Your browser is caching the CSS / JS from the old version, in which case clear your cache and for that, you need to do Force Reload.

@Tom Carrick, you are right btw.

and to Force Reload in Chrome use Hold the Ctrl key and press the Reload button. Ctrl + F5 also works

and for Mozilla Firefox Ctrl + Shift + R

For development/Production ie. on server just run

python3 manage.py collectstatic

This will bring all the html and css files for you and put that in static folder, that you have defined in settings.py.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda